package com.shop.common.enums.admin;

import lombok.Getter;

/**
 * 管理员锁定类型
 */
@Getter
public enum AdminLockEnum {

    NORMAL(0, "未锁定"),
    ADMIN_LOCK(1, "管理员锁定"),
    PASSWORD_ERROR_LOCK(2, "密码错误锁定")
    ;

    private int code;
    private String msg;

    AdminLockEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static AdminLockEnum val(int code) {
        for (AdminLockEnum enumObj: AdminLockEnum.values()) {
            if(enumObj.code == code) {
                return enumObj;
            }
        }
        return null;
    }
}
